// TypeScript file
class Line extends egret.Sprite
{
    private sp: egret.Bitmap;
    private boo: boolean = false;
    constructor()
    {
        super();

        this.sp = ResourceUtils.createBitmapByName("line_png");
        this.addChild(this.sp);
        this.sp.x = this.sp.width / 2;

        egret.Ticker.getInstance().register(this.onFrame, this);

    }

    public move(): void
    {
        this.visible = true;
        this.boo = true;

    }

    public onFrame(evt: egret.Event): void
    {
        if (!this.boo) return;

        this.y += GameData.enemySpeed;
        if (this.y <= Const.SENT_HEIGHT) return;

        this.visible = false;
        this.boo = false;
    }


}